Skip to content

fix(plugin-auth)!: invite-member refuses a blank role 400 ROLE_NOT_FOUND and writes no invitation - #29296

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-sf892x
Nov 2, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-sf892x

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Fixes #29158

Clause-②: no (narrowing) — measured: on base 104cd1a5 a blank role ("", whitespace only) on POST /api/v1/auth/organization/invite-member answered 200 and stored the invitation, in single and walled group; on this head it is refused 400 ROLE_NOT_FOUND and no row is written. Nothing is widened.
Metadata-protocol: none — measured: no schema key, accepted metadata value or metadata type moves; the diff touches no packages/spec/**.
Skills-docs: none — the narrowing is an HTTP door's accept set, not anything a metadata author writes; no skill names a blank invitation role.

维护者速读

  • 改了什么:邀请成员接口遇到空角色(空串、纯空格、或角色列表里的空项)时直接拒绝,返回 400 ROLE_NOT_FOUND,不写邀请记录。
  • 为什么改:以前空角色会被放行并存下一条角色为空的邀请;在多组织部署里被邀请人接受后成了没有组织角色的成员,读不到该读的数据,管理员也看不出原因。
  • 风险与回滚:只拒不放宽,也不会把空角色默认成 member;已存在的空角色邀请不改动。回滚即 revert 本 PR。
  • 先看:packages/plugins/plugin-auth/src/auth-manager-organization-plugin.ts(beforeCreateInvitation 新增的拒绝分支),invite-role-not-found-code.ts(判空与文案)。
  • 两分钟验证:pnpm --filter @objectstack/plugin-auth exec vitest run src/accept-invitation-adopt-membership.test.ts,预期 17 个全部通过,其中 7 个是新的空角色用例。
  • 需要你做的:无,席位落地。

What changes

  • beforeCreateInvitation (auth-manager-organization-plugin.ts) refuses a blank role first, after the cloud-managed refusal and before the invitation role cap and the placement gate: APIError('BAD_REQUEST', { code: 'ROLE_NOT_FOUND', message }). The hook runs before adapter.createInvitation, so no sys_invitation row is written.
  • invite-role-not-found-code.ts gains hasBlankInvitationRoleEntry and blankInvitationRoleRefusal. Blank means the whole value is empty or whitespace ("", " ", []) or one entry of a role list is ("member,", ",admin", ["member", ""]). The message keeps the vendor's ROLE_NOT_FOUND: prefix and says the invitation role is empty.
  • invitation-role-cap.ts: comment only. Its "not a reachable invitation shape" note on an empty role was false; it now points at the blank refusal that runs first.
  • No new error code (the door's existing ROLE_NOT_FOUND), no packages/spec/** edit, no change to which non-blank roles are accepted, no default to member, no better-auth or overrides change.

Tests

  • packages/plugins/plugin-auth/src/accept-invitation-adopt-membership.test.ts: new #29158 block on the real AuthManager and better-auth route. Six blank shapes are refused 400 ROLE_NOT_FOUND with the empty-role sentence and zero rows; a delegated admin's blank role answers ROLE_NOT_FOUND (not the cap's 403); control: the owner inviting admin is still 200 with the role stored.
  • packages/qa/dogfood/test/invitation-blank-role-refusal.dogfood.test.ts (new): the composed CRM stack in single and walled group (multiTenant: 'posture-only', the issuer owns a second organization). "", " " and "member," are refused 400 ROLE_NOT_FOUND with no row; control member is 200 with one pending row; a guard asserts the posture.
  • No existing test needed an edit.

Acceptance notes

  • On the composed stack, "member," (and ",admin") was ALREADY refused on base, by the sys_invitation.role select validator: 400 VALIDATION_FAILED (invalid_option), no row. On this head the same request answers 400 ROLE_NOT_FOUND instead. Same status, same zero rows, a different code; only "" and whitespace-only were accepted on base. Named in the report's open questions.
  • Other doors that write sys_invitation.role: none found. admin-import-users writes the admin plugin's user role, never an invitation, and drops a blank one. The data API serves sys_invitation as get/list only. A resend (resend: true) of an already pending invitation renews its expiry and keeps the stored role, before this hook, so it writes no role; a resend with no pending row creates a new invitation and meets this refusal.
  • Invitations already stored with a blank role are not rewritten; acceptance is not changed.

Verification

Premise on base 104cd1a (both postures, composed stack)

The three gate files restored to base, plugin-auth rebuilt, a throwaway probe (not committed) on the CRM stack:

  • single: "" → 200, row role: '' pending; the invitee signs up and accepts → 200, sys_member.role member (the sign-up's row is kept), invitation ['', 'accepted']. " " → 200, row role: ' '. "member," → 400 VALIDATION_FAILED. "superuser" → 400 ROLE_NOT_FOUND.
  • group: "" → 200, row role: ''; accept → 200, sys_member.role '', invitation ['', 'accepted']. " " → 200. "member," → 400 VALIDATION_FAILED. "superuser" → 400 ROLE_NOT_FOUND.
  • On base the new pins are red: unit 7 failed / 10 passed (17); dogfood 6 failed / 6 passed.
Ablation of the negative pins

node scripts/ablation-replace.mjs --anchor "if (blankRole) {" --replacement "if (blankRole && process.env.ABLATION_29158_GUARD === 'on') {", plugin-auth rebuilt, ablation-dist-preflight.mjs saw the marker in 2 dist files. Unit: 7 failed / 10 passed (expected 200 to be 400, body "role":""). Dogfood: 6 failed / 4 passed, every blank case in both postures. Restored with git checkout HEAD -- …: git status --porcelain empty, git diff HEAD 0 bytes, blob hash equal to HEAD, rebuilt, preflight --absent: marker absent from all 20 built files. A first attempt used a comment marker that the bundler strips; its preflight failed, so that reading was discarded and the run was redone with the string marker.

Suites, gates, lint (head 8d01f7c, after merging main)
  • pnpm --filter @objectstack/plugin-auth typecheck: exit 0.
  • pnpm --filter @objectstack/plugin-auth exec vitest run: Test Files 208 passed (208), Tests 3618 passed, 10 skipped.
  • eslint (--no-inline-config) over packages/plugins/plugin-auth and the new dogfood file: exit 0.
  • dispatch-gates --commands: 65 derived, 65 run with exit 0, reconciled with --ran: "65 run, 0 NOT-MEASURED, 0 UNRUN (a DERIVED zero)". Two stopped at a prerequisite on the first pass and were rerun green: check-plugin-teardown-shape --self-test (shallow clone, pinned fixture commit fetched) and check:dual-build-cjs-loads (7 packages outside the closure built first).
  • Full dogfood (pnpm --filter @objectstack/dogfood test): lock VERDICT command-exit 0; Test Files 390 passed, 3 skipped (393); Tests 3225 passed, 28 skipped (3253).

Generated by Claude Code

…UND and writes no invitation

better-auth's role check drops empty entries, so a blank role ("", whitespace,
[] or an empty entry like "member,") named no unknown role and was stored as
the invitation's role; under a walled group its acceptance wrote a membership
with no organization role. beforeCreateInvitation now refuses it first, with
the code the door already answers for an unknown role, and never defaults it.

Claude-Session: https://claude.ai/code/session_01ADHkmPVewfGaEY1hNx6XpK
Co-authored-by: Claude <noreply@anthropic.com>
…ization; pin a whitespace-only role too

Claude-Session: https://claude.ai/code/session_01ADHkmPVewfGaEY1hNx6XpK
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

6 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 60 of 216 client-bound route-ledger rows — the other 156 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 156: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 101 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 22 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json c347d22d2bcce32b414e693f2ec5ca5f564db53a → packageMentionDocs.

Which tree this was computed on

This run read content/docs from b4d952cb8f42b03d73afbfc1b9c53e641b67e7be — the merge of head 214ca68802758ad6eca5333b2135bec5753ee666 into base c347d22d2bcce32b414e693f2ec5ca5f564db53a, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b4d952cb8f42b03d73afbfc1b9c53e641b67e7be && git checkout b4d952cb8f42b03d73afbfc1b9c53e641b67e7be
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c347d22d2bcce32b414e693f2ec5ca5f564db53a 214ca68802758ad6eca5333b2135bec5753ee666 && git checkout -B drift-repro c347d22d2bcce32b414e693f2ec5ca5f564db53a && git merge --no-ff 214ca68802758ad6eca5333b2135bec5753ee666

node scripts/docs-audit/affected-docs.mjs --json c347d22d2bcce32b414e693f2ec5ca5f564db53a

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-steve · session_01ADHkmQjPiXgNoSaEpqeGvY

Contract-review-claim: session_01ADHkmQjPiXgNoSaEpqeGvY · head 8d01f7cfd2c5a5b27c702234b2a7c63400818e76 · 2026-11-02T11:15Z

The lane seat runs this PR's review at CONTRACT_REVIEW_TIER (declared Clause-②: no (narrowing)), in an isolated reviewer.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-steve · session_01ADHkmQjPiXgNoSaEpqeGvY

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8d01f7cfd2c5a5b27c702234b2a7c63400818e76
Local-runs: none
Scope: packages/plugins/plugin-auth/src/auth-manager-organization-plugin.ts, packages/plugins/plugin-auth/src/invitation-role-cap.ts, packages/plugins/plugin-auth/src/invite-role-not-found-code.ts, packages/plugins/plugin-auth/src/accept-invitation-adopt-membership.test.ts, packages/qa/dogfood/test/invitation-blank-role-refusal.dogfood.test.ts + better-auth 1.7.12 dist/plugins/organization/routes/crud-invites.mjs and crud-members.mjs (the vendor doors the hunks cite; read from the registry tarball, nothing run), packages/plugins/plugin-auth/src/auth-manager-after-hook.ts, packages/plugins/plugin-auth/src/auth-manager-before-hook.ts, packages/plugins/plugin-auth/src/adopt-membership.ts, packages/plugins/plugin-auth/src/admin-import-users.ts, packages/platform-objects/src/identity/sys-invitation.object.ts, packages/objectql/src/validation/record-validator.ts, packages/spec/src/identity/organization.zod.ts, packages/spec/src/api/error-code-ledger.zod.ts

Reviewed at 2026-11-02T11:29Z. Inputs: card #29158 (body and every comment), PR #29296 (body, file list, net diff against main), the check-runs on the head. Not the dispatch order.

① Derived judgments

  • Accept set of POST /api/v1/auth/organization/invite-member narrows — a role value whose whole string is empty or whitespace, an empty role array, or a role list with one empty entry, is refused 400 ROLE_NOT_FOUND before adapter.createInvitation; no sys_invitation row. Right. The vendor's body schema (z.union([z.string(), z.array(z.string())])) admits "", and its role check (parseRoles → split(',').map(trim).filter(Boolean)) drops exactly the entries hasBlankInvitationRoleEntry refuses, so on main those shapes named no unknown role and were stored verbatim as role: '' / 'member,'. The new guard's predicate is the vendor's drop predicate inverted (same trim), so the two agree on every string; a non-string role never reaches the hook (the zod body schema refuses it first), and hasBlankInvitationRoleEntry correctly answers false for it rather than claiming a verdict.
  • No widening anywhere. Every named role is judged as before: the vocabulary (ADR-0108), the cap's three refusals, the placement gate. The control cases (admin by the owner, member on both postures) pin it.
  • Error-code surface: no new code. ROLE_NOT_FOUND is already in the ledger (error-code-ledger.zod.ts, registered for this door by plugin-auth: invite-member refuses an unknown role with no code — the spec docstring and auth docs promise ROLE_NOT_FOUND, so an ADR-0112 client cannot recognise the refusal #24750) and is the code the spec's invitation role docstring promises "at the door, before any invitation row exists". The message keeps the vendor's ROLE_NOT_FOUND: prefix. Right. The thrown APIError carries code, so the after-hook codeInviteRoleNotFound (which only stamps an uncoded vendor refusal) leaves it untouched — no double handling.
  • Hook order — cloud-managed → blank role → role cap → placement gate. Right. A delegated admin's blank role answers ROLE_NOT_FOUND, not the cap's 403 (pinned); the cap's own "not a reachable shape" comment, which was false, is corrected to point at the guard that now runs first.
  • Resend — the vendor's resend: true branch for an already-pending invitee updates expiresAt and returns before beforeCreateInvitation, writing no role; a resend with no pending row (or an expired one, invitations: Resend on an expired invitation issues a new one and leaves the expired row pending, so the confirmation "Its expiry date starts over" is untrue #28540) creates a new invitation and meets the guard. Right, as the PR states.
  • Other doors that write a membership or invitation role, read for a blank that still gets through: update-member-role — the vendor refuses an empty roleToSet with 400 before any write (crud-members.mjs); add-member — a pathless endpoint, server-only, not reachable over HTTP; admin-import-users — writes the admin plugin's user role via createUser and drops an empty one (a zero-length data.role becomes undefined), never a sys_invitation row; the data API serves sys_invitation get/list only. No direct createInvitation caller in the tree outside the vendor route. None found open.
  • Public exports — hasBlankInvitationRoleEntry, blankInvitationRoleRefusal, InviteRoleRefusal are new exports of an internal module; @objectstack/plugin-auth's index does not re-export them (no public API surface moves). No packages/spec/** edit; no schema key moves. Metadata-protocol: none is right: the role rides an HTTP body, not anything a metadata author writes.

② Semver level

  • Changeset .changeset/29158-invite-blank-role-refused.md: @objectstack/plugin-auth: patch, Clause-②: no (narrowing), Metadata-protocol: none, BREAKING banner, exactly one ADR-0087 marker (not-required (no-migration-prescription)), a remedy line. Per AGENTS.md Post-Task Checklist 3 a non-protocol narrowing ships patch and keeps its BREAKING banner and ADR-0087 disposition — the level matches what the diff publishes. Nothing authorable is removed or renamed, so no FROM → TO map or tombstone is owed. Check Changeset is green on the head.
  • Clause-②: line — no (narrowing) on the PR body and the changeset, the measured arm (base 200 and a row; head 400 and no row) — right.
  • should-fix (prose, not a FAIL): the changeset's Before paragraph and its Clause-②: sentence say a role list with an empty entry such as "member," "answered 200 and stored the invitation". On the composed stack that shape was already refused on base — by the sys_invitation.role select validator (record-validator.ts: a blank is "missing" and the field is required: false, so '' passes; 'member,' is not an option, so invalid_option → 400 VALIDATION_FAILED). Only the whole-value blanks ("", whitespace) were accepted there; the list-entry shapes were stored only on a composition without the ObjectQL validator. A client branching on error.code sees VALIDATION_FAILED become ROLE_NOT_FOUND for that shape, which the "Who sees it" paragraph should name in one line. The level does not move.

③ Boundary flags

  • Open question 1 — "member," / ",admin" already refused 400 VALIDATION_FAILED on base, now 400 ROLE_NOT_FOUND: keep the code change? Keep it (the dev's first option), and it is acceptable under the declared level. The status and the zero-row outcome are unchanged; what moves is the code, from a write-time validator's generic refusal to the door's own code — the one the spec's role docstring already promises for a role that names no role, before any row. One code for "the role names nothing" on this door is the ADR-0112 shape; a client that branched on VALIDATION_FAILED for a comma-trailing role was branching on an accident of the write path, not on a published promise. A non-protocol code move on an already-refused input is covered by patch + BREAKING banner; it owes the one line in the changeset named in ②. The alternative (leave list entries to the validator) would make the door's answer depend on which composition sits behind it, which is the worse contract.
  • Open question 2 — default a blank role to member instead? No: refuse, as shipped. The card's security floor, the seat's order and the spec's "refused at the door" docstring all say refuse; isPlainMemberInvitation and the cap stay untouched; defaulting would be a product choice with no caller shown to rely on it.
  • Deviation: ablation redone with a string marker after a comment marker was stripped by the bundler — right call; the discarded reading was discarded, the redone one went red on every blank case and restored to a HEAD-equal blob.
  • Deviation: --workspace-concurrency placement — tooling, no bearing on the diff.
  • Deviation: no MCP write, no assignee — correct under the standard order.
  • Out-of-scope finding: invitations already stored with role: '' are not rewritten and still accept into a role-less membership under a wall. Answered: no door writes a new one now, acceptance confers less (never more) privilege, and an operator can cancel a pending blank row from the Invitations list; nothing is owed by this PR. Escalation left to the seat's discretion (a backfill or cancel-on-boot card); not a condition of this verdict.
  • Out-of-scope finding: other sys_invitation.role writers — confirmed in ① from the cited code.
  • Seat order's stop lines (no packages/spec/**, no new code, no better-auth or overrides change, no defaulting): all held in the committed tree.

④ Design judgment

  • auth-manager-organization-plugin.ts — the guard sits where the vendor hands over invitation.role as the joined string (roles = parseRoles(ctx.body.role)) and before adapter.createInvitation, so an array body is already flattened and no row exists when it throws. The cancelPendingInvitationsOnReInvite path and the expired-row re-issue both run through the hook; the pending-row resend returns earlier and writes no role. Against the card's scenario (owner or delegated admin, single and walled group, ""), the request is refused in the hook on every path that would write a role. Tried: role given as a number or object (zod body schema refuses the shape first, the guard correctly abstains), [" "] (joined to " ", refused), "member,,admin" (refused — the same entry the vendor would drop), a Unicode space trim() removes (refused, the vendor would have dropped it), a zero-width space (trim() keeps it on both sides, so the vendor refuses it as an unknown role). Holds. No finding.
  • invite-role-not-found-code.ts — hasBlankInvitationRoleEntry flattens an array the way the vendor's parseRoles does and asks the vendor's own drop predicate; blankInvitationRoleRefusal answers the ledger code with the vendor's prefix so the body shape is byte-compatible with the unknown-role refusal the same module codes. The two functions are pure and asked once per request. Holds. No finding.
  • invitation-role-cap.ts — comment only; the new sentence is true against the vendor source (body schema admits "", the check drops empties) and names the guard that runs first. requested.length === 0 → null is now genuinely unreachable from the door for a blank role (refused upstream) and remains the right fail-open-to-nothing answer for a direct caller. Holds. No finding.
  • accept-invitation-adopt-membership.test.ts — the new block runs the real AuthManager and vendor route (nothing on the path stubbed), covers all six blank shapes plus the delegate ordering case plus a named-role control, and asserts code, message prefix and zero rows. The dev reports it red on base (7 failed) and under ablation, which the mechanism predicts. Holds. No finding.
  • invitation-blank-role-refusal.dogfood.test.ts — the composed CRM stack on both postures with the ObjectQL validator in the loop, a posture guard, three blank shapes refused with no row, a member control with exactly one pending row, env restored after. This is the file that pins the "member," code move judged in ③. Holds. No finding.

No must-fix. One should-fix (② changeset prose).

Check-runs on the head at post time: 49 total, all complete — 36 success, 13 skipped (UI, docs, opt-in and sharded-matrix placeholders), 0 failure, 0 in progress. Among the green: Check Changeset, Governed Surface Queue Guard, PR-body guards, Spec property liveness, Lint · ESLint, Type Check · workspace, Test Core 1–8/8, Build Core, Dogfood Regression Gate. These conclusions are the gate verdicts this record relies on; nothing was run locally.

Implemented-by: claude/project-thread-sf892x
Reviewed-by: session_01ADHkmQjPiXgNoSaEpqeGvY

VERDICT: PASS

…ALIDATION_FAILED on the composed stack; name the code change for it

Claude-Session: https://claude.ai/code/session_01ADHkmPVewfGaEY1hNx6XpK
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#1 · os-steve · session_01ADHkmQjPiXgNoSaEpqeGvY

Regen-provenance: contract review 6576041111 (PASS, head 8d01f7cfd2c5a5b27c702234b2a7c63400818e76) carries to head 214ca68802758ad6eca5333b2135bec5753ee666. The one commit between them touches only .changeset/29158-invite-blank-role-refused.md (+3 / −2, prose), applying that record's should-fix. No code, test or level moves.

席位核对 · ACCEPT · domain:server seat 1 · os-steve · session_01ADHkmQjPiXgNoSaEpqeGvY · 2026-11-02T11:33Z

Head 214ca68802, report 6575752347 (on #29158), claim on #29158. Clause-②: no (narrowing) → contract review owed at CONTRACT_REVIEW_TIER: record 6576041111, PASS, no must-fix, carried by the provenance line above.

item reading
Shape Base main, Fixes #29158. 6 files: the blank-role guard in beforeCreateInvitation (auth-manager-organization-plugin.ts), invitation-role-cap.ts, invite-role-not-found-code.ts, a unit test and a dogfood test, a @objectstack/plugin-auth patch changeset with BREAKING banner and ADR-0087 not-required (no-migration-prescription). Metadata-protocol: none. No packages/spec/**, no new code (ROLE_NOT_FOUND is ledgered for this door). Not governed.
Rule A blank invitation role ("", whitespace, [], or a blank entry in a role list) is refused 400 ROLE_NOT_FOUND before the role cap and before any row is written, and is never defaulted. Every named role is judged as before.
Security Access boundary (org invitations). The review probed every door that writes an invitation or membership role (invite, resend, re-issue, update-member-role, add-member, admin import) and found no blank that still gets through. Legacy role: '' rows stay accepted into a role-less membership, which is less privilege, not more. Noted, not owed here.
Open question "member," moves from 400 VALIDATION_FAILED to 400 ROLE_NOT_FOUND: keep it, as the review rules. The changeset now names the code move.
Evidence Base 104cd1a5: "" → 200 with a role '' row in both postures. Head: plugin-auth 208 files / 3618 tests, typecheck 0, eslint 0, full dogfood VERDICT 0, ablation red then restored, gates 65/65. CI on 8d01f7cf: 49 runs, 36 green, 13 skipped, none red. Auto-merge waits on every required check on the new head.
Landing 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 2, 2026 11:35
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 2, 2026 11:35
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit a2fcede Nov 2, 2026
50 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-sf892x branch November 2, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant